<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Course_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[course_id]', $bankList, '', ['class'=>'selectpicker', 'required'=>''])}
            <!-- <input id="c-course_id" data-rule="required" data-source="course/index" class="form-control selectpage" name="row[course_id]" data-field="name" type="text" value=""> -->
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Diffdata')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="diffdataList" item="vo"}
            <label for="row[diffdata]-{$key}"><input id="row[diffdata]-{$key}" name="row[diffdata]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">分数:</label>
        <div class="col-xs-12 col-sm-8">
            <!-- 5个输入框 -->
            <label class="control-label">单选题：</label>
            <input type="number" class="form-control" name="grade-type1" value="1" style="width:55px;">分

            <label class="control-label">多选题：</label>
            <input type="number" class="form-control" name="grade-type2" value="2" style="width:55px;">分

            <label class="control-label">判断题：</label>
            <input type="number" class="form-control" name="grade-type3" value="1" style="width:55px;">分
            <br>
            <label class="control-label">填空题：</label>
            <input type="number" class="form-control" name="grade-type4" value="2" style="width:55px;">分

            <label class="control-label">问答题：</label>
            <input type="number" class="form-control" name="grade-type5" value="10" style="width:55px;">分
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Questions')}:</label>
        <div class="col-xs-12 col-sm-8">
            <button type="button" class="btn btn-success create-auto-btn">一键生成</button>
            <button type="button" class="btn btn-primary create-btn">手动添加</button>
            <textarea id="c-questions" class="form-control " rows="5" name="row[questions]" cols="50"  style="display:none"></textarea>
            <div class="questions-box"></div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Grades')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-grades" data-rule="required" class="form-control" step="0.1" name="row[grades]" type="number" value="0.0">
        </div>
    </div>

    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">测试状态:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" class="form-control"  name="row[status]" type="number" value="2">
        </div>
    </div> -->
    
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>

<form id="create-auto-form" class="form-horizontal" action="" style="display: none; padding: 20px;">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">单选题:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" name="type1" type="number" value="10">道
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">多选题:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" name="type2" type="number" value="10">道
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">判断题:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" name="type3" type="number" value="5">道
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">填空题:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" name="type4" type="number" value="5">道
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">问答题:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" name="type5" type="number" value="0">道
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="button" class="btn btn-primary create-auto">生成</button>
        </div>
    </div>
</form>

<style>
    .question-list .title{
        font-weight: bold;
        margin-top: 10px;
        margin-bottom: 5px;
    }

    .question-list .opts{
        text-indent: 10px;
    }
    .question-list .grades{
        width: 50px;
    }
</style>
